export interface User {
  id: string
  username: string
  displayName: string
  email: string
  avatar: string
  bio: string
  followers: number
  following: number
  posts: number
  verified: boolean
  interests: string[]
  location?: string
  joinDate: string
}

export interface Post {
  id: string
  userId: string
  content: string
  images?: string[]
  video?: string
  likes: number
  comments: number
  shares: number
  timestamp: string
  hashtags: string[]
  isLiked: boolean
  isShared: boolean
}

export interface Comment {
  id: string
  postId: string
  userId: string
  content: string
  timestamp: string
  likes: number
  isLiked: boolean
}

export interface Message {
  id: string
  senderId: string
  receiverId: string
  content: string
  timestamp: string
  read: boolean
  type: "text" | "image" | "emoji"
}

export interface Conversation {
  id: string
  participants: string[]
  lastMessage: Message
  unreadCount: number
}

// Mock Users
export const mockUsers: User[] = [
  {
    id: "1",
    username: "johndoe",
    displayName: "John Doe",
    email: "john@example.com",
    avatar: "/placeholder.svg?height=100&width=100",
    bio: "Photography enthusiast 📸 | Travel lover ✈️ | Coffee addict ☕",
    followers: 1234,
    following: 567,
    posts: 89,
    verified: true,
    interests: ["photography", "travel", "coffee"],
    location: "New York, NY",
    joinDate: "2023-01-15",
  },
  {
    id: "2",
    username: "sarahsmith",
    displayName: "Sarah Smith",
    email: "sarah@example.com",
    avatar: "/placeholder.svg?height=100&width=100",
    bio: "Digital artist 🎨 | UI/UX Designer | Creating beautiful experiences",
    followers: 2345,
    following: 432,
    posts: 156,
    verified: false,
    interests: ["design", "art", "technology"],
    location: "San Francisco, CA",
    joinDate: "2023-03-22",
  },
  {
    id: "3",
    username: "mikejohnson",
    displayName: "Mike Johnson",
    email: "mike@example.com",
    avatar: "/placeholder.svg?height=100&width=100",
    bio: "Fitness coach 💪 | Nutrition expert | Helping you achieve your goals",
    followers: 3456,
    following: 234,
    posts: 234,
    verified: true,
    interests: ["fitness", "nutrition", "wellness"],
    location: "Los Angeles, CA",
    joinDate: "2022-11-08",
  },
]

// Mock Posts
export const mockPosts: Post[] = [
  {
    id: "1",
    userId: "1",
    content:
      "Just captured this amazing sunset from my rooftop! The colors were absolutely incredible tonight. Sometimes you just have to stop and appreciate the beauty around us. 🌅 #sunset #photography #grateful",
    images: ["/placeholder.svg?height=400&width=600"],
    likes: 234,
    comments: 45,
    shares: 12,
    timestamp: "2024-01-20T18:30:00Z",
    hashtags: ["sunset", "photography", "grateful"],
    isLiked: false,
    isShared: false,
  },
  {
    id: "2",
    userId: "2",
    content:
      "Working on a new UI design for a mobile app. Love how clean and minimal this turned out! What do you think about the color palette? 🎨",
    images: ["/placeholder.svg?height=500&width=400"],
    likes: 189,
    comments: 23,
    shares: 8,
    timestamp: "2024-01-20T14:15:00Z",
    hashtags: ["design", "ui", "mobile"],
    isLiked: true,
    isShared: false,
  },
  {
    id: "3",
    userId: "3",
    content:
      "Morning workout complete! 💪 Remember, consistency is key. It's not about being perfect, it's about showing up every day and giving your best effort. Who's joining me for tomorrow's session?",
    likes: 156,
    comments: 34,
    shares: 19,
    timestamp: "2024-01-20T07:45:00Z",
    hashtags: ["fitness", "motivation", "workout"],
    isLiked: false,
    isShared: true,
  },
  {
    id: "4",
    userId: "1",
    content:
      "Coffee shop vibes ☕ Found this amazing little place downtown. Their latte art is on another level! Perfect spot for some weekend reading.",
    images: ["/placeholder.svg?height=400&width=400"],
    likes: 98,
    comments: 12,
    shares: 5,
    timestamp: "2024-01-19T10:20:00Z",
    hashtags: ["coffee", "weekend", "reading"],
    isLiked: true,
    isShared: false,
  },
]

// Mock Comments
export const mockComments: Comment[] = [
  {
    id: "1",
    postId: "1",
    userId: "2",
    content: "Absolutely stunning! The lighting is perfect 😍",
    timestamp: "2024-01-20T18:45:00Z",
    likes: 12,
    isLiked: false,
  },
  {
    id: "2",
    postId: "1",
    userId: "3",
    content: "Great shot! What camera did you use?",
    timestamp: "2024-01-20T19:10:00Z",
    likes: 5,
    isLiked: true,
  },
]

// Mock Messages
export const mockMessages: Message[] = [
  {
    id: "1",
    senderId: "2",
    receiverId: "1",
    content: "Hey! Loved your sunset photo. Where was that taken?",
    timestamp: "2024-01-20T20:30:00Z",
    read: false,
    type: "text",
  },
  {
    id: "2",
    senderId: "1",
    receiverId: "2",
    content: "Thanks! It was from my apartment rooftop in Brooklyn",
    timestamp: "2024-01-20T20:35:00Z",
    read: true,
    type: "text",
  },
]

// Mock Conversations
export const mockConversations: Conversation[] = [
  {
    id: "1",
    participants: ["1", "2"],
    lastMessage: mockMessages[1],
    unreadCount: 1,
  },
  {
    id: "2",
    participants: ["1", "3"],
    lastMessage: {
      id: "3",
      senderId: "3",
      receiverId: "1",
      content: "Want to join me for a workout tomorrow?",
      timestamp: "2024-01-20T19:45:00Z",
      read: false,
      type: "text",
    },
    unreadCount: 2,
  },
]

// Helper functions
export const getUserById = (id: string): User | undefined => {
  return mockUsers.find((user) => user.id === id)
}

export const getPostsByUserId = (userId: string): Post[] => {
  return mockPosts.filter((post) => post.userId === userId)
}

export const getCommentsByPostId = (postId: string): Comment[] => {
  return mockComments.filter((comment) => comment.postId === postId)
}

export const getConversationsByUserId = (userId: string): Conversation[] => {
  return mockConversations.filter((conv) => conv.participants.includes(userId))
}
